<?php

namespace app\admin\model;


/**
 * 网站设置
 * Class System
 * @package app\admin\model
 */
class System extends Base
{
    protected $type = [
        'system_content'    =>  'array',
    ];

    //图纸上传设置保存
    public function drawingUploadSystemSave($data){
        $data = ["system_content"=>$data];
        return $this->mySave($data,"system_name","drawingUploadSystem");
    }

    //图纸上传设置详情
    public function drawingUploadSystemInfo(){
        $system_content = $this->where("system_name","drawingUploadSystem")->value("system_content");
        $system_content = !empty($system_content) ? json_decode($system_content,true) : [];
        return $system_content;
    }

    //细节设置保存
    public function detailSettingSave($data){
        $data = ["system_content"=>$data];
        return $this->mySave($data,"system_name","detailSetting");
    }

    //细节设置详情
    public function detailSettingInfo(){
        $system_content = $this->where("system_name","detailSetting")->value("system_content");
        $system_content = !empty($system_content) ? json_decode($system_content,true) : [];
        return $system_content;
    }
}